<?php
/**
 * @package		orcamento	
 * @desc		Componente voltado to listar produtor e entreoutros
 * @author	    Lucas Emmanoel Araujo Machado (lucasemmanoel@gmail.com).
 * @since		2011-04-10	
 * @abstract	Template para exibir os dados do componente.
 */

// Não permite o acesso direto ao arquivo.
defined( '_JEXEC' ) or die( 'Restricted access' );

?>
<script language="javascript" type="text/javascript">
function submitbutton(pressbutton) {
	var form = document.adminForm;
	if (pressbutton == 'cancel') {
		submitform( pressbutton );
		return true;
	}
	// do field validation
	if (form.nome.value.length == 0) {
		alert( "<?php echo JText::_( 'Você precisa informar o nome.', true ); ?>" );
		form.nome.focus();
		return false;
	}
	submitform( pressbutton );
	return true;
}
</script>

<form action="index.php" method="post" name="adminForm">
	<div class="col100">			
		<table class="admintable">
			<tr>
				<td colspan="4" style="font-weight: bolder; color:#FF8400;">
					<?php echo $this->texto; ?>
				</td>
			</tr>
			<tr>
				<td width="20%" class="key">
					<label for="nome">
						<?php echo JText::_( 'Razão Social' ); ?>:
					</label>
				</td>
				<td width="80%"  colspan="3">
					<input type="text" size="40" name="razaoSocial" id="razaoSocial" class="inputbox" value="<?php echo $this->registro->razaoSocial; ?>" />
				</td>
			</tr>
			<tr>
				<td width="20%" class="key">
					<label for="nome">
						<?php echo JText::_( 'Nome Fantasia' ); ?>:
					</label>
				</td>
				<td width="80%"  colspan="3">
					<input type="text" size="40" name="nome" id="nome" class="inputbox" value="<?php echo $this->registro->nome; ?>" />
				</td>
			</tr>
			<tr>
				<td width="20%" class="key">
					<label for="cnpj">
						<?php echo JText::_( 'CNPJ' ); ?>:
					</label>
				</td>
				<td width="30%">
					<input type="text" size="7" name="cnpj" id="cnpj" class="inputbox" value="<?php echo $this->registro->cnpj; ?>" />
				</td>
				<td width="20%" class="key">
					<label for="inscricaoEstadual">
						<?php echo JText::_( 'Inscr. Est.' ); ?>:
					</label>
				</td>
				<td width="30%">
					<input type="text" size="7" name="inscricaoEstadual" id="inscricaoEstadual" class="inputbox" value="<?php echo $this->registro->inscricaoEstadual; ?>" />
				</td>
			</tr>
			<tr>
				<td width="20%" class="key">
					<label for="endereco">
						<?php echo JText::_( 'Endereço' ); ?>:
					</label>
				</td>
				<td width="80%"  colspan="3">
					<input type="text" size="40" name="endereco" id="endereco" class="inputbox" value="<?php echo $this->registro->endereco; ?>" />
				</td>
			</tr>
			<tr>
				<td width="20%" class="key">
					<label for="bairro">
						<?php echo JText::_( 'Bairro' ); ?>:
					</label>
				</td>
				<td width="30%">
					<input type="text" size="7" name="bairro" id="bairro" class="inputbox" value="<?php echo $this->registro->bairro; ?>" />
				</td>
				<td width="20%" class="key">
					<label for="cep">
						<?php echo JText::_( 'CEP' ); ?>:
					</label>
				</td>
				<td width="30%">
					<input type="text" size="7" name="cep" id="cep" class="inputbox" value="<?php echo $this->registro->cep; ?>" />
				</td>
			</tr>
			<tr>
				<td width="20%" class="key">
					<label for="cidade">
						<?php echo JText::_( 'Cidade' ); ?>:
					</label>
				</td>
				<td width="30%">
					<input type="text" size="7" name="cidade" id="cidade" class="inputbox" value="<?php echo $this->registro->cidade; ?>" />
				</td>
				<td width="20%" class="key">
					<label for="estado">
						<?php echo JText::_( 'Estado' ); ?>:
					</label>
				</td>
				<td width="30%">
					<?php echo $this->estados; ?>
				</td>
			</tr>
			<tr>
				<td width="20%" class="key">
					<label for="fone1">
						<?php echo JText::_( 'Fone/Fax1' ); ?>:
					</label>
				</td>
				<td width="30%">
					<input type="text" size="7" name="fone1" id="fone1" class="inputbox" value="<?php echo $this->registro->fone1; ?>" />
				</td>
				<td width="20%" class="key">
					<label for="fone2">
						<?php echo JText::_( 'Fone/Fax2' ); ?>:
					</label>
				</td>
				<td width="30%">
					<input type="text" size="7" name="fone2" id="fone2" class="inputbox" value="<?php echo $this->registro->fone2; ?>" />
				</td>
			</tr>
			<tr>
				<td width="20%" class="key">
					<label for="comprador">
						<?php echo JText::_( 'Comprador' ); ?>:
					</label>
				</td>
				<td width="80%"  colspan="3">
					<input type="text" size="40" name="comprador" id="comprador" class="inputbox" value="<?php echo $this->registro->comprador; ?>" />
				</td>
			</tr>
			<tr>
				<td width="20%" class="key">
					<label for="email">
						<?php echo JText::_( 'E-mail' ); ?>:
					</label>
				</td>
				<td width="80%"  colspan="3">
					<input type="text" size="40" name="email" id="email" class="inputbox" value="<?php echo $this->registro->email; ?>" />
				</td>
			</tr>
			<tr>
				<td width="20%" class="key">
					<label for="username">
						<?php echo JText::_( 'Usuário' ); ?>:
					</label>
				</td>
				<td width="80%"  colspan="3">
					<input type="text" size="40" name="username" id="username" class="inputbox" value="<?php echo $this->registro->username; ?>" />
				</td>
			</tr>
			<tr>
				<td width="20%" class="key">
					<label for="senha">
						<?php echo JText::_( 'Senha' ); ?>:
					</label>
				</td>
				<td width="80%"  colspan="3">
					<input type="password" size="40" name="password" id="password" class="inputbox" value="" />
				</td>
			</tr>
			<tr>
				<td width="20%" class="key">
					<label for="senha">
						<?php echo JText::_( 'Confirmar senha' ); ?>:
					</label>
				</td>
				<td width="80%"  colspan="3">
					<input type="password" size="40" name="password2" id="password2" class="inputbox" value="" />
				</td>
			</tr>
			<tr>
				<td colspan="4">
					<input type="submit" name="bt_pf" value="ENVIAR CADASTRO PARA RECEBER LISTA DE PREÇOS" />
				</td>
			</tr>
		</table>
	</div>
	
	<div class="clr"></div>
	<input type="hidden" name="tipo" value="<?php echo $this->tipo?>" />
	<input type="hidden" name="option" value="com_orcamento" />
	<input type="hidden" name="task" value="cadastrar" />
	<input type="hidden" name="controller" value="orcamento" />
	<?php echo JHTML::_( 'form.token' ); ?>
</form>
